/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CheckCodeResultVO } from '../models/CheckCodeResultVO';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class CheckCodeControllerService {

    /**
     * 生成图片验证码
     * @returns CheckCodeResultVO OK
     * @returns any Created
     * @throws ApiError
     */
    public static generatePicCheckCodeUsingPost(): CancelablePromise<CheckCodeResultVO | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/checkcode/pic',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * 校验
     * @param code 验证码
     * @param key 验证key
     * @returns boolean OK
     * @returns any Created
     * @throws ApiError
     */
    public static verifyUsingPost(
code: string,
key: string,
): CancelablePromise<boolean | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/checkcode/verify',
            query: {
                'code': code,
                'key': key,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

}
